﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace DirectorySynchronizer
{
    public partial class CtrlAdvancedOptions : UserControl
    {
        public bool ApplyOptionsChange = false;
        private MainForm parentmainform = null;
        public MainForm ParentMainForm { set { parentmainform = value; } }

        public CtrlAdvancedOptions()
        {
            InitializeComponent();
        }

        private void buttonClick(object sender, EventArgs e)
        {
            if (sender.Equals(buttonSave)) { ApplyOptionsChange = true; }
            else { ApplyOptionsChange = false; }
            if (parentmainform != null) { parentmainform.AdvancedOptionsControlClosed(); }
            else { throw new ApplicationException("Unexpected null reference to CtrlAdvancedOptions"); }
        }
    }
}
